package com.maben.vue_support.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.maben.vue_support.mapper.ISysUserMapper;
import com.maben.vue_support.pojo.SysUser;
import com.maben.vue_support.service.ISysUserService;
import com.maben.vue_support.controller.vo.SysUserVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 用户业务类
 */
@Service
@Slf4j(topic = "m.SysUserServiceImpl")
public class SysUserServiceImpl extends ServiceImpl<ISysUserMapper, SysUser> implements ISysUserService {
    /**
     * 用户通用查询
     * @param cxMap 查询map
     * @return 返回vo类
     */
    @Override
    public List<SysUserVo> queryUserListSelective(Map<String, Object> cxMap) throws Exception {
        if(cxMap==null){
            return new ArrayList<>();
        }

        return this.baseMapper.queryUserListSelective(cxMap);
    }

    @Override
    public Integer queryUserListSelectiveCount(Map<String, Object> cxMap) throws Exception {
        if(cxMap==null){
            return 0;
        }
        return this.baseMapper.queryUserListSelectiveCount(cxMap);
    }
}
